package com.frxuexi.lib_http

import com.zyj.retrofit.adapter.FlowCallAdapterFactory
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory

class TokenRetrofitImpl:BaseRetrofitImpl() {
    override fun createRetrofit(): Retrofit {
        val build = createOkhttpBuild()
        build.addInterceptor {chain->
            val request = chain.request()
            request.newBuilder().addHeader("token","")
            chain.proceed(request)
        }

        return Retrofit.Builder()
            .baseUrl(Concast.BASE_URL)
            .client(build.build())
            .addConverterFactory(GsonConverterFactory.create())
            .addCallAdapterFactory(FlowCallAdapterFactory.create())
            .build()
    }
}